const {
  mysql
} = require('../qcloud');

const {
  mysqlQuery
} = require('../tools/utils');
module.exports = async ctx => {
  let sql = `SELECT * FROM video WHERE id IN (9, 10, 86,172,81,82)`
  let videoList = await mysqlQuery(sql);

  let adList = {
    homePage: [{
      imgUrl: "https://www.15v3a.cn/AD/ad1.jpg",
      adUrl: 'https://mp.weixin.qq.com/s/1qrwWaH7i1P6oGoTNqtdlA'
    },
    {
      imgUrl: "https://y.gtimg.cn/music/common/upload/MUSIC_FOCUS/1196887.jpg",
      adUrl: 'https://mp.weixin.qq.com/s/1qrwWaH7i1P6oGoTNqtdlA'
    },
    {
      imgUrl: "https://y.gtimg.cn/music/common/upload/MUSIC_FOCUS/1197435.jpg",
      adUrl: 'https://mp.weixin.qq.com/s/1qrwWaH7i1P6oGoTNqtdlA'
    },
    {
      imgUrl: "https://y.gtimg.cn/music/common/upload/MUSIC_FOCUS/1197616.jpg",
      adUrl: 'https://mp.weixin.qq.com/s/1qrwWaH7i1P6oGoTNqtdlA'
    }
    ],
    videoPage: [{
      imgUrl: "https://www.15v3a.cn/AD/ad1.jpg",
      adUrl: 'https://mp.weixin.qq.com/s/1qrwWaH7i1P6oGoTNqtdlA'
    },
    {
      imgUrl: "https://y.gtimg.cn/music/common/upload/MUSIC_FOCUS/1196887.jpg",
      adUrl: 'https://mp.weixin.qq.com/s/1qrwWaH7i1P6oGoTNqtdlA'
    }
    ],
    videoDetail: [{
      imgUrl: "https://www.15v3a.cn/AD/ad1.jpg",
      adUrl: 'https://mp.weixin.qq.com/s/1qrwWaH7i1P6oGoTNqtdlA'
    },
    {
      imgUrl: "https://y.gtimg.cn/music/common/upload/MUSIC_FOCUS/1196887.jpg",
      adUrl: 'https://mp.weixin.qq.com/s/1qrwWaH7i1P6oGoTNqtdlA'
    }
    ],
    newVideo: [{
      imgUrl: "https://www.15v3a.cn/AD/ad1.jpg",
      adUrl: 'https://mp.weixin.qq.com/s/1qrwWaH7i1P6oGoTNqtdlA'
    },
    {
      imgUrl: "https://y.gtimg.cn/music/common/upload/MUSIC_FOCUS/1196887.jpg",
      adUrl: 'https://mp.weixin.qq.com/s/1qrwWaH7i1P6oGoTNqtdlA'
    }
    ],
    hotVideo: [{
      imgUrl: "https://www.15v3a.cn/AD/ad1.jpg",
      adUrl: 'https://mp.weixin.qq.com/s/1qrwWaH7i1P6oGoTNqtdlA'
    },
    {
      imgUrl: "https://y.gtimg.cn/music/common/upload/MUSIC_FOCUS/1196887.jpg",
      adUrl: 'https://mp.weixin.qq.com/s/1qrwWaH7i1P6oGoTNqtdlA'
    }
    ],
  }
  ctx.state.data = {
    videoList,
    adList
  }
}
